Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created "Following" Table and Sample Data in DB Schema #11

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

briana-torres
Copy link
Contributor

Summary:

This PR introduces the 'following' table to our database schema, allowing us to track the relationships where users follow other users. It also includes the insertion of initial dummy data to facilitate immediate testing and interaction with the new table structure. Once all the tables are finalized and the schema is merged into the main branch, I'll add more dummy data.

I was able to run this locally and see the "following" table without issue.

Changes:

  1. Created the 'following' table with the necessary fields: following_id, follower_user_id, following_user_id, and follow_date.
  2. Established constraints to ensure data integrity: each pair of users has a unique follow relationship, and a user cannot follow themselves.
  3. Added indexes on follower_user_id and following_user_id to optimize query performance.
  4. Inserted initial dummy data to set up basic following relationships for immediate use and testing.

.vscode/settings.json Outdated Show resolved Hide resolved
Copy link
Contributor

@leoRysing leoRysing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff, table is working correctly. Might be good to add .vscode to the gitignore

@leoRysing leoRysing merged commit df0422c into main Feb 2, 2024
3 checks passed
@leoRysing leoRysing deleted the createfollowingtable branch February 2, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants